differentiating functions of higher order